package com.itheima;

import java.util.Timer;
import java.util.TimerTask;

/**
 * ClassName: TimerTaskApp
 * Description:
 * Date: 2023/03/13 PM 10:23:22
 * <p>
 * project: springboot
 * package: com.itheima
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public class TimerTaskApp {

    public static void main(String[] args) {
        Timer timer = new Timer();
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                System.out.println("timer task run...");
            }
        };
        timer.schedule(task, 0, 2000);
    }
}
